package com.jh.paymentchannel.service;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URI;
import java.net.URLEncoder;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

import com.jh.paymentchannel.util.Util;
import com.jh.paymentchannel.util.ump.exception.VerifyException;
import com.jh.paymentchannel.util.ump.paygate.v40.Mer2Plat_v40;
import com.jh.paymentchannel.util.ump.paygate.v40.Plat2Mer_v40;

import net.sf.json.JSONObject;


@Controller
@EnableAutoConfiguration
public class SwiftB2CRCallBackService {

	private static final Logger log = LoggerFactory.getLogger(SwiftB2CRCallBackService.class);
	
	@Autowired
	Util util;
	
	@RequestMapping(method=RequestMethod.GET,value="/v1.0/paymentchannel/topup/swiftb2c/ret_url")
	public  String retcall(HttpServletRequest request, HttpServletResponse response) throws IOException{
		log.info("进入接口/v1.0/paymentchannel/topup/swiftb2c/ret_url=============== ");
		
		return "http://1.xinli2017.applinzi.com/login/error.html";
	}
	
	@RequestMapping(method=RequestMethod.GET,value="/v1.0/paymentchannel/topup/swiftb2c/fail_url")
	public  String retcallfail(HttpServletRequest request, HttpServletResponse response) throws IOException{
		log.info("进入接口/v1.0/paymentchannel/topup/swiftb2c/fail_url=============== ");
		
		return "http://1.xinli2017.applinzi.com/login/success.html";
	}
	
}
